home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Mania 6
/
MacMania 6.toast
/
/
Tools&Utilities
/
EnterAct Stuff
/
Drag_on Modules
/
hAWK example progs
/
$hum_to_text
< prev
next >
Wrap
Text File
|
1994-01-26
|
606b
|
52 lines
# $hum_to_text: strip CR's from within paragraphs, paragraph
# starts as in the hAWK User's Manual (hum)
BEGIN {
while (getline x > 0)
{
if (para_start())
{
paragraph()
buffer = x
}
else if (para_end())
{
buffer = buffer x
paragraph()
}
else
buffer = buffer x
}
paragraph()
}
function paragraph()
{
print buffer
buffer = ""
}
function para_start()
{
if (x == "")
return 1;
if (x ~ /^[0-9]/)
return 1;
if (x ~ /^•/)
return 1;
if (x ~ /^ /) # option space
return 1;
if (x ~ /^----*/)
{
x = ""
return 1
}
}
function para_end()
{
}